package org.akomantoso.core.io.util.group;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import org.akomantoso.core.data.Date;
import org.akomantoso.core.data.Def;
import org.akomantoso.core.data.Entity;
import org.akomantoso.core.data.Judge;
import org.akomantoso.core.data.Location;
import org.akomantoso.core.data.Organization;
import org.akomantoso.core.data.Person;
import org.akomantoso.core.data.Quantity;
import org.akomantoso.core.data.Term;
import org.akomantoso.core.data.group.ANsemanticInline;
import org.akomantoso.core.io.util.Instantiator;

/**
 * @author <a href="mailto:jacques.militello@gmail.com">Jacques Militello</a>
 */
public final class ANsemanticInlineGroup {

	private ANsemanticInlineGroup() {
	}

	public static final Map<String, Instantiator<ANsemanticInline>> MAP;

	static {

		Map<String, Instantiator<ANsemanticInline>> temp = new HashMap<String, Instantiator<ANsemanticInline>>();

		// date
		temp.put(Date.ELEMENT, new Instantiator<ANsemanticInline>() {
			public Date instantiate() {
				return new Date();
			}
		});

		// quantity
		temp.put(Quantity.ELEMENT, new Instantiator<ANsemanticInline>() {
			public Quantity instantiate() {
				return new Quantity();
			}
		});

		// judge
		temp.put(Judge.ELEMENT, new Instantiator<ANsemanticInline>() {
			public Judge instantiate() {
				return new Judge();
			}
		});

		// term
		temp.put(Term.ELEMENT, new Instantiator<ANsemanticInline>() {
			public Term instantiate() {
				return new Term();
			}
		});

		// person
		temp.put(Person.ELEMENT, new Instantiator<ANsemanticInline>() {
			public Person instantiate() {
				return new Person();
			}
		});

		// organization
		temp.put(Organization.ELEMENT, new Instantiator<ANsemanticInline>() {
			public Organization instantiate() {
				return new Organization();
			}
		});

		// location
		temp.put(Location.ELEMENT, new Instantiator<ANsemanticInline>() {
			public Location instantiate() {
				return new Location();
			}
		});

		// entity
		temp.put(Entity.ELEMENT, new Instantiator<ANsemanticInline>() {
			public Entity instantiate() {
				return new Entity();
			}
		});

		// def
		temp.put(Def.ELEMENT, new Instantiator<ANsemanticInline>() {
			public Def instantiate() {
				return new Def();
			}
		});

		MAP = Collections.unmodifiableMap(temp);
	}

}